home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SPACE 2
/
SPACE - Library 2 - Volume 1.iso
/
magazi~1
/
435
/
sweep.lst
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS
UTF-8
Wrap
File List
|
1989-08-17
|
23.6 KB
|
1,168 lines
Rem *************************************
Rem * *
Rem * Survey Sweepstakes *
Rem * *
Rem * by A. Baggetta *
Rem * Copyright 1989 *
Rem * by ANALOG Computing *
Rem * *
Rem *************************************
Dim Oldcolri(15),Oldcolrr(15),Oldcolrg(15),Oldcolrb(15)
Dim Name$(9),Nv(10),Chs$(11)
Dim Q0$(100),Q1$(100),I0$(100),I1$(100),I2$(100),I3$(100),I4$(100)
Dim I5$(100),I6$(100),I7$(100),I8$(100),I9$(100)
'
If Xbios(4)<>0
Alert 3,"Low Rez Only",1,"Sorry",Dummy%
End
Endif
@Colr_get
Round=0
Sr=99
Turn=0
Sound 1,0
Wave 1,0
Setcolor 4,2,1,4
Setcolor 10,7,7,7
Setcolor 9,7,7,7
Print At(14,2);"Select A File"
@Lod_file
If Ed=1 Then
Goto Finish
Endif
Hidem
Storage$=""
Your_name$="--------------------"
Topgame:
If Round=Sr Then
@Winner_screen
If Ik$="Y" Or Ik$="y" Then
Turn=0
Ik$=""
Round=0
Sr=99
Goto Topgame
Endif
If Ik$="N" Or Ik$="n" Then
Cls
Goto Finish
Endif
Endif
@Opening
@Place_question
Leave=0
Repeat
If C_t_y=1 Then
@Input_your_answers
Endif
'
' quit
'
If Ik$="Y" Or Ik$="y" Then
Turn=0
Ik$=""
Round=0
Sr=99
Goto Topgame
Endif
If Ik$="N" Or Ik$="n" Then
Cls
Goto Finish
Endif
'
If C_t_n=1 Then
@Input_norman_answer
Endif
Until Leave=1
If Rev$="Y" Or Rev$="y" Then
Prbox 10,60,150,150
Prbox 160,60,300,150
Ancol=3
Anrow=9
For Blank=9 To 17
Print At(3,Blank);" "
Next Blank
Print At(Ancol,Anrow);"Correct Answers"
Anrow=Anrow+1
For Ani=0 To 4
Print At(Ancol,Anrow+(Ani+1));Chs$(Ani)
Next Ani
Print At(Ancol,Anrow+(Ani+1)+2);"**Press Return**"
Repeat
Until Inkey$<>""
Endif
Leave=0
Goto End_round
'
Face_data:
Data 0,0,11,0,11,0,17,3,17,3,25,11,25,11,29,23,29,23,31,20,31,20,33,19
Data 33,19,36,20,36,20,37,22,37,22,36,26,36,26,34,29,34,29,30,31,30,31
Data 29,39,29,39,27,47,27,47,22,52,22,52,17,54,17,54,9,55,9,55,2,55,2,55
Data -6,54,-6,54,-11,52,-11,52,-16,47,-16,47,-18,39,-18,39,-19,31,-19,31
Data -23,29,-23,29,-24,26,-24,26,-24,22,-24,22,-23,20,-23,20,-22,19,-22,19
Data -20,20,-20,20,-18,23,-18,23,-14,10,-14,10,-6,3,-6,3,0,0
' brows
Data -11,22,-7,20,-7,20,-3,20,-3,20,0,20,0,20,2,22
Data 9,22,11,21,11,21,14,20,14,20,18,20,18,20,22,22
' glasses
' bridge
' left view
Data -18,22,-10,24,-10,24,21,25,21,25,29,22
Data -10,24,-12,27,-12,27,-12,30,-12,30,-11,33,-11,33,-9,34,-9,34,-5,34
Data -5,34,0,30,0,30,1,27,1,27,1,24
' glasses
' right view
Data 10,24,10,27,10,27,11,30,11,30,16,34,16,34,20,34,20,34,22,33,22,33
Data 23,30,23,30,23,27,23,27,21,25
' nose
Data 0,30,0,33,0,33,-1,36,-1,36,-3,38,-3,38,-4,40,-4,40,-1,41,-1,41
Data 4,42,4,42,7,42,7,42,12,41,12,41,15,40,15,40,14,38,14,38,12,36,12,36
Data 11,33,11,33,11,30
' smile mouth
Data -11,40,-5,45,-5,45,2,47,2,47,9,47,9,47,16,45,16,45,22,40
' tooth
Data -2,46,-2,49,-2,49,2,49,2,49,2,47
'
Procedure Draw_faces
Color 8
Restore Face_data
Repeat
Read C0%,R0%,C1%,R1%
Line C%+C0%/2,R%+R0%/2,C%+C1%/2,R%+R1%/2
Until C0%=2 And R0%=49 And C1%=2 And R1%=47
Plot C%-7/2,R%+28/2 ! Place Knowing Norman's eyes
Plot C%-6/2,R%+28/2
Plot C%+17/2,R%+28/2
Plot C%+18/2,R%+28/2
Deffill 9,2,8
Fill C%+5,32
Deffill 3,2,8
Fill C%-5/2,R%+29/2
Fill C%+19/2,R%+29/2
Deffill 12,2,8
Fill C%+2/2,R%+27/2
Deffill 0,2,8
Fill C%+28/2,R%+25/2
Return
'
'
Procedure Smile
Graphmode 2
Restore Dt0
R%=30
C%=225
Repeat
Read C0%,R0%,C1%,R1%
Line C%+C0%/2,R%+R0%/2,C%+C1%/2,R%+R1%/2
Until C0%=2 And R0%=49 And C1%=2 And R1%=47
Dt0:
Data -11,40,-5,45,-5,45,2,47,2,47,9,47,9,47,16,45,16,45,22,40
' tooth
Data -2,46,-2,49,-2,49,2,49,2,49,2,47
Return
'
Procedure Sadness
Restore Dt1
R%=30
C%=225
Repeat
Read C0%,R0%,C1%,R1%
Line C%+C0%/2,R%+R0%/2,C%+C1%/2,R%+R1%/2
Until C0%=16 And R0%=45 And C1%=22 And R1%=47
Dt1:
Data -11,47,-5,45,-5,45,16,45,16,45,22,47
Return
'
'
' keep the old color pallett
'
Procedure Colr_get
For I%=0 To 15
@Vq_color(I%)
Oldcolri(I%)=I%
Oldcolrr(I%)=R%
Oldcolrg(I%)=G%
Oldcolrb(I%)=B%
Next I%
Return
'
Procedure Vq_color(I%)
Dpoke Contrl,26
Dpoke Contrl+2,0
Dpoke Contrl+4,0
Dpoke Contrl+6,2
Dpoke Contrl+8,0
Dpoke Intin,I%
Dpoke Intin+2,1
Vdisys
R%=Dpeek(Intout+2)
G%=Dpeek(Intout+4)
B%=Dpeek(Intout+6)
Return
'
' restore old colors and end
'
Finish:
For I%=0 To 15
In%=Oldcolri(I%)
R%=Oldcolrr(I%)
G%=Oldcolrg(I%)
B%=Oldcolrb(I%)
Gosub Vr_color(In%,R%,G%,B%)
Next I%
End
'
Procedure Vr_color(In%,R%,G%,B%)
Dpoke Contrl,14
Dpoke Contrl+2,0
Dpoke Contrl+6,4
Dpoke Intin,In%
Dpoke Intin+2,R%
Dpoke Intin+4,G%
Dpoke Intin+6,B%
Vdisys
Return
'
Procedure Opening
Cls
Reveal=0
Ang=0
Mik=0
If Turn=0 Then
Yscr=0
Nscr=0
Deffill 4,2,19
Color 4
Box 0,0,310,199
Box 40,25,270,170
Fill 5,5
Print At(10,6);"Hi, I'm Norman!"
C%=150
R%=30
@Draw_faces
Deftext 4,4,0,6
Text 77,168,"Survey Sweepsteaks"
Print At(10,10);"Your name, please: ";
Print At(12,13);Your_name$
Print At(10,13);
Form Input 20,New_name$
If New_name$="" Then
==> New_name$=Your_name$
Else
Your_name$=New_name$
Endif
Print At(10,15);"Reveal Answers? Y/N"
Leap:
Print At(30,15);
Form Input 1,Rev$
If Rev$<>"Y" And Rev$<>"y" And Rev$<>"N" And Rev$<>"n" Then
Print At(30,15);" "
Goto Leap
Endif
Asr=5
Bsr=10
Sr=Int(Rnd*(Bsr-Asr+1))+Asr
Print At(10,17);" Rounds: "
Print At(10,18);" In This Game ";Sr
Pause 100
Endif
Used$=""
Bonus=0
Chance%=0
Chance2%=0
Ritechk%=0
Ritechk2%=0
Col%=2
Row%=10
Coln%=22
Rown%=10
If Turn=0 Then
Deffill 4,2,8
Pbox 0,0,310,200
Deftext 7,4,0,24
Graphmode 2
Text 19,22,"Survey Sweepstakes"
Deftext 6,4,0,24
Text 20,23,"Survey Sweepstakes"
C%=225 ! Place Norman Face
R%=30
@Draw_faces
Deftext 8,0,0,4
Text 20,55,Your_name$
Text 170,55,"Knowing"
Text 245,55,"Norman"
Deffill 1,2,8 ! Define two text windows in black
Color 10
Rbox 159,59,301,151 ! Outline Norman's box
Prbox 160,60,300,150
Color 11
Rbox 9,59,151,151 ! Outline your
Prbox 10,60,150,150
Deffill 0,2,8
Deftext 1,0,0,4
Color 0
Rbox 9,154,301,186 ! Outline question box in pink
Prbox 10,155,300,185 ! Define a white window for questions
Get 0,0,310,199,Screen$
Deftext 8,0,0,4
Text 165,150,"Score:"+Str$(Nscr)
Text 15,150,"Score:"+Str$(Yscr)
Deftext 1,0,0,8
Text 45,172,Chr$(158)+"rice "+Chr$(214)+"aterhose,"+Chr$(216)+"nc."
Deftext 1,1,0,4
Text 65,181,"Fictionalized Perlustrations"
Deffill 0,2,8
Pbox 108,35,190,45
@In_song
Deftext 1,1,0,4
Text 115,42,"Press A Key"
@Mug_it
Repeat
Until Inkey$<>""
Else
Put 0,0,Screen$,3
Endif
@Comment
@Mug_it
Pause 100
Deffill 1,2,8
Prbox 160,60,300,150
Turn=1
Deffill 1,2,8
Prbox 10,140,150,150
Deftext 8,0,0,4
Text 15,150,"Score: "+Str$(Yscr)
Prbox 160,140,300,150
Text 165,150,"Score: "+Str$(Nscr)
'
Deftext 1,0,0,4 ! Set up and identify the notice boxes
Deffill 2,2,8
Prbox 10,188,50,198
Text 16,195,"RIGHT"
Deffill 3,2,8
Prbox 70,188,110,198
Text 76,195,"WRONG"
Deffill 6,2,8
Prbox 130,188,210,198
Text 148,195,"ILLEGAL"
Deffill 1,2,8
Color 2
Rbox 270,188,290,198
Color 3
Rbox 271,189,289,197
Prbox 272,190,288,196
Deftext 2,0,0,4
Text 225,196,"Timer->"
Deftext 0,0,0,4
Text 277,195," "
Color 2
Rbox 95,32,200,48
Bn=Int(Rnd*5)+1 ! If Bn=5 then we get a bonus round
If Bn=5 Then ! Twenty points instead of ten
Graphmode 3
Text 20,45,"BONUS"
@Bonus_sound
For Rpt=1 To 6
Text 20,45,"BONUS"
Pause 10
Next Rpt
Bonus=1
Endif
Graphmode 2
Return
'
Procedure Place_question
Deffill 0,2,8
Round=Round+1
Pbox 108,35,190,45
Deftext 1,16,0,4
Text 125,42,"ROUND "+Str$(Round)
Deftext 1,0,0,4
Color 15
Rbox 9,154,301,186 ! Outline question box in pink
Prbox 10,155,300,185 ! Define a white window for questions
@Select_data
Text 15,170,Quest0$
Text 15,177,Quest1$
C_t_y=1
Return
'
Procedure Input_your_answers
C_t_n=0
C_t_y=0
Leave=0
'
U1:
Graphmode 2
Response$=""
Inc Chance%
Yclr%=7
Col%=2
Lk%=0
Print At(Col%-1,Row%);">"
Print At(Col%+1,Row%);" "
Tmc=0
Tm=11
Deftext 0,0,0,4
Deffill 1,2,8
Repeat
Inc Tmc
If Tmc=1000 Then
Sound 1,15,5,7
Dec Tm
Tmc=0
Prbox 272,190,288,196
If Tm=10 Then
Text 274,195,Str$(Tm)
Else
Text 277,195,Str$(Tm)
Endif
If Tm=0 Then
Graphmode 3
Sound 1,0
Setcolor 10,7,7,7
Text 277,195,Str$(Tm)
Pause 10
Tm=11
Tmc=0
@Bounce_out
Graphmode 2
'
' If you cannot answer subtract 10 points from your score and
' give to norman. Show capitalization on norman window.
'
Yscr=Yscr-10
Deffill 1,2,8
Prbox 10,140,150,150
Deftext 8,0,0,4
Text 15,150,"Score: "+Str$(Yscr)
Nscr=Nscr+10
Prbox 160,140,300,150
Deftext 8,0,0,4
Text 165,150,"Score: "+Str$(Nscr)+" CAPITALIZED"
@Capitalize_sound
Prbox 160,140,300,150
Deftext 8,0,0,4
Text 165,150,"Score: "+Str$(Nscr)
'
Graphmode 2
C_t_n=1
Endif
If C_t_n=1 Then
Goto Byebye
Endif
Endif
X$=Inkey$
If Lk%=16 Then
Goto Out
Endif
Dec Yclr%
Setcolor 10,Yclr%,Yclr%,Yclr%
If Yclr%=0 Then
Yclr%=7
Endif
If X$<>"" And X$<>Chr$(8) Then ! IF A LEGAL KEY IS PRESSED PRINT IT
Inc Col%
Print At(Col%,Row%);X$
Response$=Response$+X$
Inc Lk%
Endif
If X$=Chr$(8) Then !IF THE BACKSPACE KEY IS PRESSED ERASE NAME$
For Ers%=3 To Col%
Print At(Ers%,Row%);" "
Next Ers%
Col%=2
Response$=""
Lk%=0
Endif
Sound 1,0
Until X$=Chr$(13) ! IF THE RETURN KEY IS PRESSED JUMP OUT
==> Out:
Sound 1,0
Graphmode 2
Prbox 272,190,288,196 ! FILL IN TIMER WITH BLANK
Rn=-1
Setcolor 10,7,7,7
Response$=Mid$(Response$,1,Len(Response$)-1)
If Mid$(Response$,1,1)>"\" And Mid$(Response$,1,1)<"{" Then
Convt$=Mid$(Response$,1,1)
Convt=Asc(Convt$)
Convt=Convt-32
Mid$(Response$,1,1)=Chr$(Convt)
Endif
If Mid$(Response$,1,4)="Quit" Or Mid$(Response$,1,4)="quit" Then
@Winner_screen
Goto Byebye
Endif
If Mid$(Response$,1,5)="Chall" Or Mid$(Response$,1,5)="chall" And Mik=0 Then
Mik=1
Inc Row%
C_t_n=1
@Chall_music
Goto Byebye
Endif
If Mid$(Response$,1,5)="Chall" Or Mid$(Response$,1,5)="chall" And Mik=1 Then
@Ill_sign
Goto U1
Endif
If Mid$(Response$,1,4)=Mid$(Chs$(0),1,4) Then
Rn=0
Endif
If Mid$(Response$,1,4)=Mid$(Chs$(1),1,4) Then
Rn=1
Endif
If Mid$(Response$,1,4)=Mid$(Chs$(2),1,4) Then
Rn=2
Endif
If Mid$(Response$,1,4)=Mid$(Chs$(3),1,4) Then
Rn=3
Endif
If Mid$(Response$,1,4)=Mid$(Chs$(4),1,4) Then
Rn=4
Endif
If Mid$(Response$,1,4)=Mid$(Chs$(5),1,4) Then
Rn=5
Endif
If Mid$(Response$,1,4)=Mid$(Chs$(6),1,4) Then
Rn=6
Endif
If Mid$(Response$,1,4)=Mid$(Chs$(7),1,4) Then
Rn=7
Endif
If Mid$(Response$,1,4)=Mid$(Chs$(8),1,4) Then
Rn=8
Endif
If Mid$(Response$,1,4)=Mid$(Chs$(9),1,4) Then
Rn=9
Endif
If Rn<0 Or Rn>9 Then
Goto Jumpover
Endif
'
' It it has been used catch it and offer another chance
'
@Used_check
If Cku=1 Then
@Ill_sign
Dec Chance%
Goto U1
Endif
Used$=Used$+Str$(Rn)
Cku=0
'
Jumpover:
@Check_answers
If Right%=1 Then
@Correct
Inc Ritechk%
Inc Row%
If Bonus=1 Then ! If bonus round give an extra 10 points
Yscr=Yscr+20
Else
Yscr=Yscr+10
Endif
Deffill 1,2,8
Prbox 10,140,150,150
Deftext 8,0,0,4
For Rs=1 To 5
Graphmode 3
Text 15,150,"Score: "+Str$(Yscr)
Pause 10
Next Rs
Graphmode 2
C_t_y=1
Else
@Incorrect
Inc Row%
If Bonus=1 Then
Nscr=Nscr+20
Else
Nscr=Nscr+10
Endif
Deffill 1,2,8
Prbox 160,140,300,150
Deftext 8,0,0,4
For Rs=1 To 5
Graphmode 3
Text 165,150,"Score: "+Str$(Nscr)
Pause 10
Next Rs
Graphmode 2
C_t_n=1
Endif
'
' Check to see if your number of chances have been alloted or
' If you have three correct answers to win
'
If Ritechk%=3 Then
Leave=1
Yscr=Yscr+20
Deffill 1,2,8
Prbox 10,140,150,150
Deftext 8,0,0,4
For Rs=1 To 5
Graphmode 3
Text 15,150,"Score: "+Str$(Yscr)
Pause 10
Next Rs
Graphmode 2
Goto Byebye
Endif
If Chance%=4 Then
Leave=1
Endif
Byebye:
Graphmode 2
Return
'
Procedure Input_norman_answer
C_t_n=0
C_t_y=0
@Mug_it
Leave=0
For Trpt=1 To 4
Graphmode 3
Deftext 0,0,0,4
Text 230,149,"MY TURN!!"
Pause 20
Next Trpt
Inc Chance2%
Response$=""
U2:
Rn=0
Coln%=22
Rn=Int(Rnd*15)
If Rn>9 And Ang=0 Then
Response$="Challenge "
Ang=1 ! Allow only one challange
Coln%=21
Ad%=0
Print At(Coln%+1,Rown%);" "
For Prtnm=1 To Len(Response$)
Inc Ad%
Print At(Coln%+Ad%,Rown%);Mid$(Response$,Prtnm,1)
Pause Int(Rnd*20)+1
Next Prtnm
Inc Rown%
C_t_y=1
@Chall_music
Goto Byebye2
Endif
If Rn>9 And Ang=1 Then
Goto U2
Endif
'
' Do not allow any repeats of the number
'
@Used_check
If Cku=1 Then
Goto U2
Endif
Used$=Used$+Str$(Rn)
Cku=0
'
Response$=Chs$(Rn)
Pz=Int(Rnd*12000)+1
Tmc=0
Tm=11
Graphmode 2
Deftext 0,0,0,4
Text 230,149,"Hmmmmmmm?"
For Pzrpt=1 To Pz
Tmc=Tmc+1
If Tmc=1000 Then
Sound 1,15,5,7
Tm=Tm-1
Tmc=0
Prbox 272,190,288,196
If Tm=10 Then
Text 274,195,Str$(Tm)
Else
Text 277,195,Str$(Tm)
Endif
If Tm=0
Graphmode 3
Text 230,149,"Hmmmmmmm?"
Graphmode 2
Sound 1,0
For Rptmr=1 To 3
Graphmode 3
Text 277,195,Str$(Tm)
Pause 10
Next Rptmr
Graphmode 2
Tm=10
Tmc=0
@Bounce_out
C_t_y=1
If C_t_y=1 Then
Goto Ot
Endif
Endif
Endif
Ot:
Sound 1,0
Exit If C_t_y=1
Next Pzrpt
If C_t_y=1 Then
Goto Byebye2
Endif
Graphmode 3
Text 230,149,"Hmmmmmmm?"
Sound 1,0
Coln%=21
Ad%=0
Fka=65
Fkb=122
Print At(Coln%+1,Rown%);" "
Stln=Len(Response$)
For Prtnm=1 To Stln
Inc Ad%
Print At(Coln%+Ad%,Rown%);Mid$(Response$,Prtnm,1)
Pause Int(Rnd*40)+1
Fk=Int(Rnd*(Fkb-Fka+1))+Fka ! Norman makes typing errors and
Fkk=Int(Rnd*5)+1 ! corrects them.
If Fkk=5 And Stln<>Prtnm Then
Print At(Coln%+Ad%+1,Rown%);Chr$(Fk)
Pause Int(Rnd*40)+1
Endif
Next Prtnm
Pause 80
'
@Check_answers
If Right%=1 Then
@Correct
Inc Ritechk2%
Inc Rown%
If Bonus=1 Then
Nscr=Nscr+20
Else
Nscr=Nscr+10
Endif
Deffill 1,2,8
Prbox 160,140,300,150
Deftext 8,0,0,4
For Rs=1 To 5
Graphmode 3
Text 165,150,"Score: "+Str$(Nscr)
Pause 10
Next Rs
Graphmode 2
C_t_n=1
Else
@Incorrect
Inc Rown%
If Bonus=1 Then
Yscr=Yscr+20
Else
Yscr=Yscr+10
Endif
Deffill 1,2,8
Prbox 10,140,150,150
Deftext 8,0,0,4
For Rs=1 To 5
Graphmode 3
Text 15,150,"Score: "+Str$(Yscr)
Pause 10
Next Rs
Graphmode 2
C_t_y=1
Endif
If Chance2%=>4 Then
Leave=1
Goto Byebye2
Endif
If Ritechk2%=3 Then
Leave=1
Deffill 1,2,8
Prbox 160,140,300,150
Deftext 8,0,0,4
For Rs=1 To 5
Graphmode 3
Text 165,150,"Score: "+Str$(Nscr)
Pause 10
Next Rs
Graphmode 2
Endif
Byebye2:
Graphmode 2
Return
'
Procedure Correct
Sound 1,0
Graphmode 2
Deftext 1,0,0,4
Deffill 2,2,8
For J%=1 To 5
Sound 1,10,9,5,2
Prbox 10,188,50,198
Pause 5
Text 16,195,"RIGHT"
Sound 1,10,4,5,15
Next J%
Sound 1,0
Right%=0
Return
'
Procedure Incorrect
Sound 1,0
Wave 1,0
Graphmode 2
Deftext 1,0,0,4
Deffill 3,2,8
Wave 1,1,14,35
For J%=1 To 5
Prbox 70,188,110,198
Pause 5
Text 76,195,"WRONG"
Pause 5
Next J%
Wave 1,0
Return
'
Procedure Check_answers
Right%=0
Wrong%=0
For I%=0 To 4
If Mid$(Chs$(I%),1,4)=Mid$(Response$,1,4) Then
Right%=1
Endif
Next I%
Return
'
==> End_round:
Sound 1,0
Wave 1,0
Cls
Deffill 1,2,8
Prbox 0,40,320,170
Deftext 2,4,0,24
Text 50,100,"End of Round "+Str$(Round)
Deftext 3,4,0,6
If Yscr>Nscr Then
Text 75,120,"The winner so far is "
Text 80,135,Your_name$
Text 80,150,Str$(Yscr)+" points"
Endif
If Nscr>Yscr Then
Text 40,120,"Seems like Norman is winning."
Text 40,135,Str$(Nscr)+" points"
Endif
If Nscr=Yscr Then
Text 40,120,"Well, we have a tie so far."
Text 40,135,Str$(Nscr)+" to "+Str$(Yscr)
Endif
Wave 1,1,12,300
Scrn%=7
For Srpt=1 To 20000
Dec Scrn%
If Scrn%=0 Then
Scrn%=7
Endif
Setcolor 0,Scrn%,Scrn%,Scrn%
Next Srpt
Setcolor 0,7,7,7
Wave 1,0
Bonus=0
Goto Topgame
'
Procedure Ill_sign
Sound 1,0
Wave 1,0
Graphmode 2
Deftext 1,0,0,4
Wave 1,1,8,100
For Rpt%=1 To 5
Deffill 6,2,8
Prbox 130,188,210,198
Pause 10
Text 148,195,"ILLEGAL"
Pause 10
Next Rpt%
Wave 1,0
Graphmode 1
Return
'
Procedure Select_data
Ss%=Int(Rnd*(Vbls-1))
Ss$=Str$(Ss%)
If Len(Ss$)<2 Then
Ss$="0"+Ss$
Endif
==> Add_data=Add_data+1
If Add_data=Vbls-1 Then
Storage$=""
==> Add_data=0
Endif
For Ex%=0 To Len(Storage$)
If Mid$(Storage$,Ex%,2)=Ss$ Then
@Select_data
Endif
Next Ex%
Storage$=Storage$+Ss$
Quest0$=Q0$(Ss%)
Quest1$=Q1$(Ss%)
Chs$(0)=I0$(Ss%)
Chs$(1)=I1$(Ss%)
Chs$(2)=I2$(Ss%)
Chs$(3)=I3$(Ss%)
Chs$(4)=I4$(Ss%)
Chs$(5)=I5$(Ss%)
Chs$(6)=I6$(Ss%)
Chs$(7)=I7$(Ss%)
Chs$(8)=I8$(Ss%)
Chs$(9)=I9$(Ss%)
Return
'
Procedure Lod_file
Ed=0
Fileselect "a:\*.swp","Quest3.swp",Aa$
Cls
If Exist(Aa$) Then
Open "I",#1,Aa$
Input #1,A$
Vbls=Val(A$)
Print At(10,10);Aa$
Print At(10,12);"Loading....";Vbls;" Questions"
Print At(10,14);"Question #";
For I%=0 To Vbls-1
Print At(21,14);I%+1
Input #1,A$
Q0$(I%)=A$
Input #1,A$
Q1$(I%)=A$
Input #1,A$
I0$(I%)=A$
Input #1,A$
I1$(I%)=A$
Input #1,A$
I2$(I%)=A$
Input #1,A$
I3$(I%)=A$
Input #1,A$
I4$(I%)=A$
Input #1,A$
I5$(I%)=A$
Input #1,A$
I6$(I%)=A$
Input #1,A$
I7$(I%)=A$
Input #1,A$
I8$(I%)=A$
Input #1,A$
I9$(I%)=A$
Next I%
Pause 100
Else
Alert 3," | |Missing Question File",1,"END",Ab
Ed=1
Endif
Cls
Return
'
Procedure Used_check
Cku=0
For Ex2%=1 To Len(Used$)
If Mid$(Used$,Ex2%,1)=Str$(Rn) Then
Cku=1
Endif
Next Ex2%
Return
'
Procedure Bounce_out
Sound 1,0
Wave 1,0
For Drop=12 Downto 1
Sound 1,10,Drop,4,1
Next Drop
Sound 1,0
For Bounce=1 To 10
For Up=1 To 3
Sound 1,10,Up,4,1
Next Up
For Down=3 Downto 1
Sound 1,10,Down,4,1
Next Down
Next Bounce
Sound 1,10,1,1,10
Sound 1,0
Wave 1,0
Return
'
Procedure Winner_screen
Graphmode 2
Cls
Sound 1,0
Wave 1,0
Deffill 1,2,8
Prbox 0,40,320,170
Deftext 2,4,0,24
Text 100,100,"WINNER"
Deftext 3,0,0,6
If Nscr>Yscr Then
Tval=Nscr*Int(Rnd*200)+1
Tval$=Str$(Tval)
Text 70,120,"Norman"
Text 70,135,"$"+Tval$+" "+Str$(Nscr)+" points"
Nscr=0
Tval=0
Goto Cloz_up
Endif
If Yscr>Nscr Then
Tval=Yscr*Int(Rnd*200)+1
Tval$=Str$(Tval)
Text 70,120,Your_name$
Text 70,135,"$"+Tval$+" "+Str$(Yscr)+" points"
Yscr=0
Tval=0
Goto Cloz_up
Endif
If Yscr<>0 And Nscr<>0 And Yscr=Nscr Then
Text 55,120,"Tie Game...No winners here."
Endif
Cloz_up:
Wave 1,1,12,300
Scrn%=7
Text 35,150,"<Y> to play again <N> to end"
Repeat
Dec Scrn%
If Scrn%=0 Then
Scrn%=7
Endif
Setcolor 0,Scrn%,Scrn%+2,Scrn%+4
Ik$=Inkey$
Pause 5
Until Ik$="Y" Or Ik$="y" Or Ik$="N" Or Ik$="n"
Setcolor 0,7,7,7
Wave 1,0
Return
'
Procedure Chall_music
Sound 1,0
Sound 2,0
Sound 3,0
Wave 7,0
Restore C_major
For G=1 To 5
Read Nt1,Nt2,Nt3,Oct
Sound 1,10,Nt1,5
Sound 2,10,Nt2,5
Sound 3,10,Nt3,5
Wave 7,7,3,15000,10
Next G
C_major:
Data 1,5,8,4
C_minor:
Data 1,8,4,4
C_major_6:
Data 1,5,10,3
C_minor_7:
Data 4,1,10,3
C_7:
Data 1,5,11,4
Return
'
Procedure In_song
Restore Intro_song
For Sn=1 To 9
Del=5
If Sn=3 Or Sn=6 Or Sn=9 Then
Del=9
Endif
Read Xs
Sound 1,10,Xs,4,Del
Next Sn
Sound 1,10,12,3
Sound 2,10,3,4
Sound 3,10,8,4
Wave 7,7,3,8000,10
Intro_song:
Data 12,10,8
Data 10,8,6
Data 8,6,5
Return
'
Procedure Comment
Comt=Int(Rnd*10)+1
If Comt=1 Then
Print At(22,12);" Ok, Pal... "
Print At(22,13);"Let's gooooo!! "
Endif
If Comt=2 Then
Print At(22,12);" Ok pushover "
Print At(22,13);"Get cookin!!!!!"
Endif
If Comt=3 Then
Print At(22,12);"Make out your "
Print At(22,13);"will yet??? "
Endif
If Comt=4 Then
Print At(22,12);"Might as well "
Print At(22,13);"quit right now!"
Endif
If Comt=5 Then
Print At(22,12);"Look out, kid.."
Print At(22,13);"dis is war!!! "
Endif
If Comt=6 Then
Print At(22,12);"Scared, yet, "
Print At(22,13);"Pal??? "
Endif
If Comt=7 Then
Print At(22,12);"Get your coffin"
Print At(22,13);"ready!! "
Endif
If Comt=8 Then
Print At(22,12);"Your feelin' da"
Print At(22,13);"heat now...?? "
Endif
If Comt=9 Then
Print At(22,12);"Psssssssst! "
Print At(22,13);"Booooooooooo!.. "
Endif
If Comt=10 Then
Print At(22,12);"Go back to grade"
Print At(22,13);"school!!! "
Endif
Return
'
Procedure Mug_it
Graphmode 2
For Facerpt=1 To 3
Sound 1,10,12,6,1
Color 0
@Smile
Color 8
@Sadness
Pause 2
Sound 1,10,1,6,1
Color 0
@Sadness
Color 8
@Smile
Pause 2
Next Facerpt
Sound 1,0
Return
'
Procedure Bonus_sound
For Decay=15 To 0 Step -3
For Ups=1 To 12
Sound 1,Decay,Ups,5,1
Next Ups
Next Decay
Return
'
Procedure Capitalize_sound
For Cap=1 To 100
For I=1 To 10
Wave 1,1,1000,I
Next I
For I=10 To 1 Step -1
Wave 1,1,1000,I
Next I
Next Cap
Sound 1,0
Wave 1,0
Return